import { MidwayConfig } from '@midwayjs/core';
export default {
  cors: {
    origin: '*',
  },
  sequelize: {
    dataSource: {
      default: {
        database: 'enjoy_plus',
        username: 'root',
        password: 'Suanyu1008123P@ssw0rd123',
        host: '127.0.0.1',
        port: 33060,
        encrypt: false,
        dialect: 'mysql',
        define: { charset: 'utf8',freezeTableName:true },
        timezone: '+08:00',
        // 本地的时候，可以通过 sync: true 直接 createTable
        sync: false,
        entities: [
          //  'entity',
          '**/entity/*.entity.{j,t}s',// 通配加后缀匹配
        ],
      }
    }
  },
  jwt: {
    secret: 'a1abb$cc2dd', // fs.readFileSync('xxxxx.key')
    sign: {
      // signOptions
      expiresIn: '2d', // https://github.com/vercel/ms
    },
    adminSecret:'cc$$aaop1'
  },
  domain: {
    url:'http://enjoyapi.yiye.pro'
  }
} as MidwayConfig;
